export default{
    namespaced: true,
    state: {
        colors:[
            {
                name:'蓝色',
                color:'#0eb0c9'
            },{
                name:'红色',
                color:'#de7897'
            },{
                name:'紫色',
                color:'#310f1b'
            },
        ],
        currentThemeColor:{
            name:'红色',
            color:'#de7897'
        }
    },
    getters: {
        getColorNames(state){
            return state.colors.map(r=>r.name)
        }
    },
    mutations: {
        updateCurrentThemeColor(state,val){
            state.currentThemeColor = val
        }
    },
    actions: {
        updateCurrentThemeColor(store,val){
            store.commit('updateCurrentThemeColor',val)
        }
    },
    modules: {
        
    }
}